package com.ddzj.scaffold.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @Author:yangzibo
 * @CreateTime:2023-12-23 23:03
 * @Description:
 * @Version:1.0
 **/
public abstract class AbstractEntity implements Serializable {
    // 主键
    protected String id;

    // 租户号
    protected String traceId;

    // 乐观锁
    protected Long revision;

    // 创建人id
    @TableField(value = "create_account", fill = FieldFill.INSERT)
    protected String createAccount;

    // 创建时间
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    protected LocalDateTime createTime;

    //修改人id
    @TableField(value = "last_update_account", fill = FieldFill.INSERT)
    protected String lastUpdateAccount;

    //修改时间
    @TableField(value = "last_update_time", fill = FieldFill.INSERT)
    protected LocalDateTime lastUpdateTime;


    /**
     * 获取 主键
     *
     * @return id 主键
     */
    public String getId() {
        return this.id;
    }

    /**
     * 设置 主键
     *
     * @param id 主键
     */
    public void setId(String id) {
        this.id = id;
    }


    /**
     * 获取 乐观锁
     *
     * @return revision 乐观锁
     */
    public Long getRevision() {
        return this.revision;
    }

    /**
     * 设置 乐观锁
     *
     * @param revision 乐观锁
     */
    public void setRevision(Long revision) {
        this.revision = revision;
    }

    /**
     * 获取 创建人id    @TableField(value = "create_account" fill = FieldFill.INSERT)
     *
     * @return createAccount 创建人id    @TableField(value = "create_account" fill = FieldFill.INSERT)
     */
    public String getCreateAccount() {
        return this.createAccount;
    }

    /**
     * 设置 创建人id    @TableField(value = "create_account" fill = FieldFill.INSERT)
     *
     * @param createAccount 创建人id    @TableField(value = "create_account" fill = FieldFill.INSERT)
     */
    public void setCreateAccount(String createAccount) {
        this.createAccount = createAccount;
    }

    /**
     * 获取 创建时间    @TableField(value = "create_time" fill = FieldFill.INSERT)
     *
     * @return createTime 创建时间    @TableField(value = "create_time" fill = FieldFill.INSERT)
     */
    public LocalDateTime getCreateTime() {
        return this.createTime;
    }

    /**
     * 设置 创建时间    @TableField(value = "create_time" fill = FieldFill.INSERT)
     *
     * @param createTime 创建时间    @TableField(value = "create_time" fill = FieldFill.INSERT)
     */
    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    /**
     * 获取 修改人id    @TableField(value = "last_update_account" fill = FieldFill.INSERT)
     *
     * @return lastUpdateAccount 修改人id    @TableField(value = "last_update_account" fill = FieldFill.INSERT)
     */
    public String getLastUpdateAccount() {
        return this.lastUpdateAccount;
    }

    /**
     * 设置 修改人id    @TableField(value = "last_update_account" fill = FieldFill.INSERT)
     *
     * @param lastUpdateAccount 修改人id    @TableField(value = "last_update_account" fill = FieldFill.INSERT)
     */
    public void setLastUpdateAccount(String lastUpdateAccount) {
        this.lastUpdateAccount = lastUpdateAccount;
    }

    /**
     * 获取 修改时间    @TableField(value = "last_update_time" fill = FieldFill.INSERT)
     *
     * @return lastUpdateTime 修改时间    @TableField(value = "last_update_time" fill = FieldFill.INSERT)
     */
    public LocalDateTime getLastUpdateTime() {
        return this.lastUpdateTime;
    }

    /**
     * 设置 修改时间    @TableField(value = "last_update_time" fill = FieldFill.INSERT)
     *
     * @param lastUpdateTime 修改时间    @TableField(value = "last_update_time" fill = FieldFill.INSERT)
     */
    public void setLastUpdateTime(LocalDateTime lastUpdateTime) {
        this.lastUpdateTime = lastUpdateTime;
    }

    /**
     * 获取 租户号
     *
     * @return traceId 租户号
     */
    public String getTraceId() {
        return this.traceId;
    }

    /**
     * 设置 租户号
     *
     * @param traceId 租户号
     */
    public void setTraceId(String traceId) {
        this.traceId = traceId;
    }
}
